package org.xdq.demo.api.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xdq.demo.service.security.HomeService;
import org.xdq.demo.vo.MenuVo;
import org.xdq.demo.vo.R;

import java.util.List;

@RestController
@RequestMapping("/security/home") //设置本控制器所有处理方法的统一地址前缀
public class HomeController {

    @Autowired
    private HomeService homeService;

    @GetMapping("/menu")
    public R<List<MenuVo>> menuList(){

        List<MenuVo> menuList = homeService.getMenuList();

        return R.OK(menuList);
    }
}
